package 设计模式;

import java.util.Arrays;
import java.util.HashMap;

/**
 * @Author: 李浩然
 * @Date: 2021/3/3 8:27 下午
 */
public class test {

    private static int[] temp1(int[] temp) {
        if (temp == null || temp.length == 0) return new int[]{};
        for (int i = 0; i < temp.length; i++) {
            if (temp[i] > 30000 || temp[i] < 1) return new int[]{};
        }
        int[] res = new int[temp.length];
        Arrays.fill(res, 0);
        for (int i = 0; i < temp.length; i++) {
            for (int j = i + 1; j < temp.length; j++) {
                if (temp[j] > temp[i]) res[i] = j - i;
            }
        }
        return res;
    }
}
